Continuous knapsack problem